<?php
use yii\helpers\Url;
use yii\helpers\Html;
use yii\widgets\LinkPager;
$this->title='行业资讯';
?>
<link rel="stylesheet" type="text/css" href="/css/hangyezixun.css"/>
<link rel="stylesheet" type="text/css" href="/css/public1.css"/>
<style>
  .image{
height: 230px;
background-position: center center ;
filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
-moz-background-size: 100% 100%;
background-size: 100% 100%;
}
</style>
<div class="main">
  <div class="left" >
<?php if(!empty($artlist)){ foreach ($artlist as $key => $art) {?>
  <div class="left1">
  		<div class="left1_l">
    		<h4><a href="<?= Url::to(['operate/details'])?>?article_id=<?= Html::encode($lable['article_id'])?>"><?= Html::encode($art['article_title'])?></a></h4>
       	    <p>作者：<?= Html::encode($art['article_author'])?>         <?= Html::encode($art['user_name'])?>发布与  两天前</p>
            <p><a href="<?= Url::to(['operate/details'])?>?article_id=<?= Html::encode($lable['article_id'])?>">【文章摘要】<?= Html::encode($art['article_descripte'])?></a></p>
            <p>阅读：<?= Html::encode($art['article_count'])?>        标签：<?= Html::encode($art['artlable_name'])?></p>        
        </div>
        
        <div class="left1_r">
       		 <a href="<?= Url::to(['operate/details'])?>?article_id=<?= Html::encode($lable['article_id'])?>"><img class="image" src="http://admin.bwphp.com/<?= Html::encode($art['article_thumb'])?>"/></a>
        </div>

        
    </div>
<?php } }else{?>
<div class="left1">
        <h2>抱歉、暂无关于此项的数据!</h2>
    </div>
<?php }?>
  </div>  
  <div class="right">
  	  <div class="right1">
      	<h3>热门标签</h3>
        <ul>
        <?php foreach ($db as $key => $lable) {?>
        	<li><a href="<?= Url::to(['operate/search'])?>?lable_id=<?= Html::encode($lable['artlable_id'])?>"><?= Html::encode($lable['artlable_name'])?></a>  </li>
        <?php }?>
        </ul>

      </div>
  	  <div class="right2">
          <h3>热门问题</h3>
          <ul>
          <?php foreach ($NewArticle as $key => $new) {?>
          	<li><a href="<?= Url::to(['operate/search'])?>?lable_id=<?= Html::encode($lable['artlable_id'])?>">
          <?php
          $str = $new['article_title'];
          if(strlen($str)<30){
                        echo $str;
                    }else{
            $num = mb_substr($str,0,30,'utf-8');
            $rrr  = str_replace($str,$num."...",$str);
            echo $rrr;
          }  
        ?>
          </a>

            <p>阅读(<?= Html::encode($new['article_count'])?>)</p></li>
          <?php }?>  
          </ul>
      
      </div>    
  </div>
    
</div>
